package com.aoyy.util.order;

import java.util.List;
import java.util.ArrayList;
/**===============================================
 * <code>OrderState</code> enum for order state
 * @author Administrator
 * @date 2017-07-12
 * ================================================ */
public enum State {
  RECEIVED_PAYMENT {
	@Override
	public String getName() {
	  return "Received Payment";	
	}
  },
  FULFILLED {
	@Override
	public String getName() {
	  return "Fulfilled";  	
	}
  },
  DELIVERED {
	@Override
	public String getName() {
	  return "Delivered";	
	}
  },
  CANCEL_ORDER {
	@Override
	public String getName() {
	  return "Cancel Order";	
	}
  };
	
  public abstract String getName();	
  
  public static List<String> getNames() {
	List<String> list = new ArrayList<String>();
	State[] orderStates = State.values();
	for (State orderState: orderStates) {
	  list.add(orderState.getName());	
	}
	return list;
  }

}
